package com.actimize.eh;

public class EHProxyProxy implements com.actimize.eh.EHProxy {
  private String _endpoint = null;
  private com.actimize.eh.EHProxy eHProxy = null;
  
  public EHProxyProxy() {
    _initEHProxyProxy();
  }
  
  public EHProxyProxy(String endpoint) {
    _endpoint = endpoint;
    _initEHProxyProxy();
  }
  
  private void _initEHProxyProxy() {
    try {
      eHProxy = (new com.actimize.eh.EventHandlerServiceLocator()).getEventHandlerServiceHttpPort();
      if (eHProxy != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)eHProxy)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)eHProxy)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (eHProxy != null)
      ((javax.xml.rpc.Stub)eHProxy)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public com.actimize.eh.EHProxy getEHProxy() {
    if (eHProxy == null)
      _initEHProxyProxy();
    return eHProxy;
  }
  
  public com.actimize.eh.EHResult evaluateMobileEvent_V1(com.actimize.eh.ChannelEventIFMType channelEvent, com.actimize.eh.holders.ResponseIFMTypeHolder channelEventResponse) throws java.rmi.RemoteException{
    if (eHProxy == null)
      _initEHProxyProxy();
    return eHProxy.evaluateMobileEvent_V1(channelEvent, channelEventResponse);
  }
  
  public com.actimize.eh.EHResult evaluateChannelEvent_V2(com.actimize.eh.ChannelEventACPType channelEvent, com.actimize.eh.holders.ResponseACPTypeHolder channelEventResponse) throws java.rmi.RemoteException{
    if (eHProxy == null)
      _initEHProxyProxy();
    return eHProxy.evaluateChannelEvent_V2(channelEvent, channelEventResponse);
  }
  
  
}